import getlink from "@/apis/request.js";

export default {
  state: {
      link1:[],
      link2:[],
      list:[],
  },
  mutations: {
    changeHome(state,payload){
      state.link1 = payload.link1;
      state.link2 = payload.link2;
      state.list = payload.list;
    }
  },
  actions: {
    getHome(context,payload){
      getlink(payload.url)
      .then((ok) => {
        context.commit('changeHome',ok.data);
      })
      .catch((err) => {
          alert(err);
      });
    }
  },
  getters: {

  }
}
